import { sequelize } from './sequelize.js';
import { Book } from '../model/book.js'



// 同步模型到数据库
export const sync = async function () {
    try {
        await sequelize.authenticate();
        console.log('数据库连接成功');
    } catch (error) {
        console.error('数据库连接失败', error);
    }
    await sequelize.sync()
}